const store = new Vuex.Store({
  state: {
    login: false,
    curUser: uni.getStorageSync("curUser") || null,
    token: '',
  },
  mutations: {
    MLOGIN(state, curUser, token) {
      console.log(state)
      console.log(curUser)
      console.log(token)
      state.login = true
      state.curUser = curUser
      state.token = token
      uni.setStorageSync("curUser",curUser)
    },
    MLOGOUT(state) {
      state.login = false
      state.token = null
      state.curUser = null
      uni.clearStorageSync("curUser");
    },
  },

});